@ECHO OFF
set MODE=Debug

ECHO Building...
msbuild /verbosity:quiet /p:Configuration=%MODE%

ECHO Finding tests...
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
SET TESTS=
for /R tests %%F in (*.csproj) DO (
	SET FILE=%%~dpFbin\%MODE%\%%~nF.dll
	IF EXIST !FILE! SET TESTS=!TESTS! !FILE!
)

ECHO Running tests...
Gallio.Echo /rd:tests /rnf:Results /sr /rt:XHtml /rfp:AttachmentContentDisposition=Inline %TESTS%

ECHO Done.